package com.demo3;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Component;import javax.annotation.PostConstruct;import javax.annotation.PreDestroy;@Componentpublic class BComponent {    @Autowired private AComponent aComponent;    @PostConstruct    public void postConstruct()    {        System.out.println("B对象初始化...");    }    @PreDestroy    public void preDestroy()    {        System.out.println("B对象销毁...");    }}